import com.kuang.config.MaoConfig;
import com.kuang.pojo.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MyText {
    public static void main(String[] args) {
       ApplicationContext context= new AnnotationConfigApplicationContext(MaoConfig.class);
        User  getUser   =   (User) context.getBean("getuser");
        System.out.println(getUser.getName());

    }
}
